package com.vito.framework.system.notice.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.vito.framework.base.model.Entity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName("sys_group")
@ApiModel(value = "sys_group对象", description = "分组关系管理表")
public class NoticeBean extends Entity<NoticeBean> {

	/**
	 * 保存到session必须序列化
	 */
	private static final long serialVersionUID = 8985675818645729662L;

	@TableId(value = "id", type = IdType.AUTO)
	private String orgId;

	@TableField("name")
	@ApiModelProperty("机构名称")
	private String orgName;

	@TableField("name")
	@ApiModelProperty("公告编号")
	private String noticeId;

	@TableField("name")
	@ApiModelProperty("公告标题")
	private String noticeName;

	@TableField("name")
    @ApiModelProperty("公告内容")
	private String noticeMsg;

	@TableField("name")
    @ApiModelProperty("发布时间")
	private String releaseTime;

	@TableField("name")
    @ApiModelProperty("公告类型0内部1公共")
	private String noticeType;

	@TableField("name")
	private String noticeTypeName;

	@TableField("name")
    @ApiModelProperty("操作人姓名")
	private String operator;

	@TableField("name")
    @ApiModelProperty("操作人ID")
	private String operatorId;

	@TableField("name")
    @ApiModelProperty("操作时间")
	private String opdate;

	@TableField("name")
    @ApiModelProperty("屏蔽标识0未屏蔽 1屏蔽")
	private String deleteFlag;

	@TableField("name")
    @ApiModelProperty("已读未读标识 0未读  1已读")
	private String readFlag;

	public void setNoticeType(String noticeType) {
		this.noticeType = noticeType;
		if("0".equals(noticeType)){
			this.noticeTypeName ="公开";
		}else if("1".equals(noticeType)){
			this.noticeTypeName ="私有";
		}
	}
}
